﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace getPixelInformation
{
    class Matrix
    {
        private int[,] a;

        public Matrix()
        {
            this.a = new int[100, 100];
        }

        public Matrix(int n, int m)
        {
            this.a = new int[n, m];
            for (int i = 0; i < n; i++)
                for (int j = 0; j < m; j++)
                    this.a[i, j] = 0;
        }

        public Matrix(int n, int m, int i_s, int j_s)
        {
            this.a = new int[n, m];
            for (int i = 0; i < n; i++)
                for (int j = 0; j < m; j++)
                {
                    if (i == i_s && j == j_s)
                        this.a[i, j] = -1;
                    else
                        this.a[i, j] = -2;
                }
        }

        public Matrix(Matrix M)
        {
            this.a = new int[100, 100];
            for (int i = 0; i < 100; i++)
                for (int j = 0; j < 100; j++)
                    this.a[i, j] = M.a[i, j];
        }

        public void setValue(int n, int m, int val)
        {
            this.a[n, m] = val;
        }

        public int compare(int n, int m, int val)
        {
            if (n >= 0 && m >= 0 && this.a[n, m] != val)
                return 1;
            return 0;
        }

        public int getValue(int n, int m)
        {
            int temp = this.a[n, m];
            return temp;
        }
    }
}
